ocaml/examples: Link examples to gnulib
authorRichard W.M. Jones <rjones@redhat.com>
Sat, 11 Sep 2021 08:36:08 +0000 (09:36 +0100)
committerHilko Bengen <bengen@debian.org>
Sat, 25 Sep 2021 15:51:52 +0000 (16:51 +0100)
commit7d5f488b2d9045ba10258fb809b79566e41403c4
treeb863cb0b8ed4111db400432fdda73b8dab05e086
parent2e9addcb47db0cade9412500aa55976fb012c2d9
ocaml/examples: Link examples to gnulib

It's unclear why exactly the OCaml library is using replacement
symbols, but it is so we need gnulib.  Note this only applies in the
stable-1.44 branch since upstream we have finally got rid of gnulib,
because of exactly these kinds of problems that it causes everyone.

ocamlfind ocamlopt -cclib -L../../lib/.libs -package unix -linkpkg \
          -warn-error A -I .. mlguestfs.cmxa create_disk.ml -o create_disk
../libmlguestfs.a(libguestfsocaml_a-guestfs-c.o): In function `guestfs_finalize':
/home/rjones/d/libguestfs-1.44/ocaml/guestfs-c.c:86: undefined reference to `rpl_free'
/home/rjones/d/libguestfs-1.44/ocaml/guestfs-c.c:88: undefined reference to `rpl_free'
../libmlguestfs.a(libguestfsocaml_a-guestfs-c.o): In function `guestfs_int_ocaml_set_event_callback':
/home/rjones/d/libguestfs-1.44/ocaml/guestfs-c.c:239: undefined reference to `rpl_free'
../libmlguestfs.a(libguestfsocaml_a-guestfs-c.o): In function `guestfs_int_ocaml_delete_event_callback':
/home/rjones/d/libguestfs-1.44/ocaml/guestfs-c.c:266: undefined reference to `rpl_free'
../libmlguestfs.a(libguestfsocaml_a-guestfs-c.o): In function `guestfs_int_ocaml_event_to_string':
/home/rjones/d/libguestfs-1.44/ocaml/guestfs-c.c:290: undefined reference to `rpl_free'
../libmlguestfs.a(libguestfsocaml_a-guestfs-c-actions.o):/home/rjones/d/libguestfs-1.44/ocaml/guestfs-c-actions.c:1188: more undefined references to `rpl_free' follow
collect2: error: ld returned 1 exit status
File "caml_startup", line 1:
Error: Error during linking
make[2]: *** [Makefile:2272: create_disk] Error 2

Gbp-Pq: Name ocaml-examples-Link-examples-to-gnulib.patch
ocaml/examples/Makefile.am